<template>
    
    <Breadcrumb />
    <div class="file-content">
        <CardView
            :maps="maps"
            :data="data"
            @optEdit="open"
        />
    </div>
</template>

<script setup>
import Breadcrumb from '@/components/common/breadcrumb/index.vue'
import CardView from '@/components/common/cardView/index.vue'
import { ref, reactive } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

const data = reactive({})
let maps = ref([
    {
        id: 1,
        name: '测试用例',
        title: '测试用例',
        type: 'mind',
        router: '/mind'
    },
    {
        id: 2,
        name: '接口管理',
        title: '接口管理',
        type: 'api',
        router: '/api'
    }
])

function open(id){
    router.push({
        path: maps.value[id-1].router,
    })
}

</script>

<style scoped>
.file-content {
    /* border: 0.1px solid #369; */
    position: fixed;
    top: 60px;
    bottom: 10px;
    left:10%;
    right: 10%;
}
</style>
